<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QWidgetItem Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QWidgetItem Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QWidgetItem class is a layout item that represents a widget.
<a href="#details">More...</a></p>

<p>Inherits <a href="qlayoutitem.html">QLayoutItem</a>.</p><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qwidgetitem.html#QWidgetItem">__init__</a></b> (<i>self</i>, QWidget&#160;<i>w</i>)</li><li><div class="fn" />Qt.Orientations <b><a href="qwidgetitem.html#expandingDirections">expandingDirections</a></b> (<i>self</i>)</li><li><div class="fn" />QRect <b><a href="qwidgetitem.html#geometry">geometry</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qwidgetitem.html#hasHeightForWidth">hasHeightForWidth</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qwidgetitem.html#heightForWidth">heightForWidth</a></b> (<i>self</i>, int)</li><li><div class="fn" />bool <b><a href="qwidgetitem.html#isEmpty">isEmpty</a></b> (<i>self</i>)</li><li><div class="fn" />QSize <b><a href="qwidgetitem.html#maximumSize">maximumSize</a></b> (<i>self</i>)</li><li><div class="fn" />QSize <b><a href="qwidgetitem.html#minimumSize">minimumSize</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qwidgetitem.html#setGeometry">setGeometry</a></b> (<i>self</i>, QRect)</li><li><div class="fn" />QSize <b><a href="qwidgetitem.html#sizeHint">sizeHint</a></b> (<i>self</i>)</li><li><div class="fn" />QWidget <b><a href="qwidgetitem.html#widget">widget</a></b> (<i>self</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QWidgetItem class is a layout item that represents a
widget.</p>
<p>Normally, you don't need to use this class directly. Qt's
built-in layout managers provide the following functions for
manipulating widgets in layouts:</p>
<table class="generic">
<thead>
<tr class="qt-style">
<th>Class</th>
<th>Functions</th>
</tr>
</thead>
<tr class="odd" valign="top">
<td><a href="qboxlayout.html">QBoxLayout</a></td>
<td><a href="qboxlayout.html#addWidget">addWidget()</a>, <a href="qboxlayout.html#insertWidget">insertWidget()</a>, <a href="qboxlayout.html#setStretchFactor">setStretchFactor()</a></td>
</tr>
<tr class="even" valign="top">
<td><a href="qgridlayout.html">QGridLayout</a></td>
<td><a href="qgridlayout.html#addWidget">addWidget()</a></td>
</tr>
<tr class="odd" valign="top">
<td><a href="qstackedlayout.html">QStackedLayout</a></td>
<td><a href="qstackedlayout.html#addWidget">addWidget()</a>,
<a href="qstackedlayout.html#insertWidget">insertWidget()</a>,
<a href="qstackedlayout.html#currentWidget">currentWidget()</a>,
<a href="qstackedlayout.html#setCurrentWidget">setCurrentWidget()</a>,
<a href="qstackedlayout.html#widget">widget()</a></td>
</tr>
</table>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QWidgetItem" />QWidgetItem.__init__ (<i>self</i>, <a href="qwidget.html">QWidget</a>&#160;<i>w</i>)</h3><p>Creates an item containing the given <i>widget</i>.</p>


<h3 class="fn"><a name="expandingDirections" /><a href="qt-orientations.html">Qt.Orientations</a> QWidgetItem.expandingDirections (<i>self</i>)</h3><p>Reimplemented from <a href="qlayoutitem.html#expandingDirections">QLayoutItem.expandingDirections</a>().</p>


<h3 class="fn"><a name="geometry" /><a href="qrect.html">QRect</a> QWidgetItem.geometry (<i>self</i>)</h3><p>Reimplemented from <a href="qlayoutitem.html#geometry">QLayoutItem.geometry</a>().</p>
<p><b>See also</b> <a href="qwidgetitem.html#setGeometry">setGeometry</a>().</p>


<h3 class="fn"><a name="hasHeightForWidth" />bool QWidgetItem.hasHeightForWidth (<i>self</i>)</h3><p>Reimplemented from <a href="qlayoutitem.html#hasHeightForWidth">QLayoutItem.hasHeightForWidth</a>().</p>


<h3 class="fn"><a name="heightForWidth" />int QWidgetItem.heightForWidth (<i>self</i>, int)</h3><p>Reimplemented from <a href="qlayoutitem.html#heightForWidth">QLayoutItem.heightForWidth</a>().</p>


<h3 class="fn"><a name="isEmpty" />bool QWidgetItem.isEmpty (<i>self</i>)</h3><p>Reimplemented from <a href="qlayoutitem.html#isEmpty">QLayoutItem.isEmpty</a>().</p>
<p>Returns true if the widget is hidden; otherwise returns
false.</p>
<p><b>See also</b> <a href="qwidget.html#isHidden">QWidget.isHidden</a>().</p>


<h3 class="fn"><a name="maximumSize" /><a href="qsize.html">QSize</a> QWidgetItem.maximumSize (<i>self</i>)</h3><p>Reimplemented from <a href="qlayoutitem.html#maximumSize">QLayoutItem.maximumSize</a>().</p>


<h3 class="fn"><a name="minimumSize" /><a href="qsize.html">QSize</a> QWidgetItem.minimumSize (<i>self</i>)</h3><p>Reimplemented from <a href="qlayoutitem.html#minimumSize">QLayoutItem.minimumSize</a>().</p>


<h3 class="fn"><a name="setGeometry" />QWidgetItem.setGeometry (<i>self</i>, <a href="qrect.html">QRect</a>)</h3><p>Reimplemented from <a href="qlayoutitem.html#setGeometry">QLayoutItem.setGeometry</a>().</p>
<p><b>See also</b> <a href="qwidgetitem.html#geometry">geometry</a>().</p>


<h3 class="fn"><a name="sizeHint" /><a href="qsize.html">QSize</a> QWidgetItem.sizeHint (<i>self</i>)</h3><p>Reimplemented from <a href="qlayoutitem.html#sizeHint">QLayoutItem.sizeHint</a>().</p>


<h3 class="fn"><a name="widget" /><a href="qwidget.html">QWidget</a> QWidgetItem.widget (<i>self</i>)</h3><p>Reimplemented from <a href="qlayoutitem.html#widget">QLayoutItem.widget</a>().</p>
<p>Returns the widget managed by this item.</p>
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;snapshot-4.9.5-9eb6aac99275 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2012</td><td align="right" width="25%">Qt&#160;4.8.3</td></tr></table></div></address></body></html>